package com.dingreading.cloud.subject.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 叮叮线下培训课程表 实体类。
 *
 * @author EDY
 * @since 2025-11-17
 */
@Data
@Table("course_train")
public class CourseTrain implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID，主键自增
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 课程uid
     */
    private String uid;

    /**
     * 课程名称
     */
    private String name;

    /**
     * 课程介绍
     */
    private String intro;

    /**
     * 展示顺序
     */
    private Integer orderNum;

    /**
     * 主分类uid
     */
    private String mainTypeUid;

    /**
     * 父分类uid
     */
    private String typeUid;

    /**
     * 层级nodes
     */
    private String trainNodes;

    /**
     * 启用状态：0-禁用，1-启用
     */
    private Integer enabled;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;

    /**
     * 最后修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date editTime;

    /**
     * 添加人用户ID
     */
    private String addStaffUid;

    /**
     * 添加人姓名
     */
    private String addStaffName;

    /**
     * 最后修改人用户ID
     */
    private String lastStaffUid;

    /**
     * 最后修改人姓名
     */
    private String lastStaffName;

}
